<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>${sendEmailTitle}</title>
    <link href="${server}/css/bootstrap.css" rel="stylesheet"/>
    <link href="${server}/css/main.css" rel="stylesheet"/>
    <link href="${server}/css/public.css" rel="stylesheet">
</head>
<body>
<div class="head_bg">
<#include "nav.ftl">
    <div class="email col-md-offset-4 col-md-4">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <label class="panel-title">${sendEmailTitle}</label>
            </div>
            <div class="panel-body">
                <label style="color: red;line-height: 16px" id="sendEmailTip"></label>
                <input type="text" name="email" id="email" class="form-control" placeholder="输入你的邮箱">
                <button id="send" class="btn btn-primary">点击发送</button>
            </div>
        </div>
    </div>


</div>
<div class="reg_bigBg">
    <img src="${server}/img/loginRe/login_bg.jpg" alt="login_bg"/>
</div>
</body>
<script src="${server}/js/jquery.min.js"></script>
<script src="${server}/js/bootstrap.min.js"></script>
<script src="${server}/js/main.js"></script>


<script>
    var count = 60;
    function wait() {
        if (count == 0) {
            $('#send').html('点击发送');
            $('#send').attr("disabled", false);
            count = 60;
        }
        else {
            $('#send').html('重新发送' + count);
            $('#send').attr("disabled", true);
            count--;
            setTimeout("wait()", 1000);
        }
    }
    $('#send').click(function () {
        $('#send').html('正在发送....');
        $('#send').attr("disabled", true);
        $.ajax({
            url: "${sendEmailAction}",
            type: "POST",
            data: {"email": $('#email').val()},
            success: function (data) {
                $('#sendEmailTip').html(data);
                wait();
            }
        })
    })

</script>
</html>

